﻿using System;
using System.Collections.Generic;
using System.Data;
using nkstdgia.common.ThamDinhGia.BusinessObjects;
using nkstdgia.common.ThamDinhGia.DataAccess;

namespace nkstdgia.common.ThamDinhGia.BusinessLogic
{
    public class THAM_SOBL
    {
        #region ***** Init Methods *****

        THAM_SODA objTHAM_SODA;

        public THAM_SOBL()
        {
            objTHAM_SODA = new THAM_SODA();
        }

        #endregion ***** Init Methods *****

        #region ***** Get Methods *****

        /// <summary>
        /// Get THAM_SO by ma_tham_so
        /// </summary>
        /// <param name="ma_tham_so">MA_THAM_SO</param>
        /// <returns>THAM_SO</returns>
        public THAM_SO GetByMA_THAM_SO(Int64 ma_tham_so)
        {
            return objTHAM_SODA.GetByMA_THAM_SO(ma_tham_so);
        }

        /// <summary>
        /// Get all of THAM_SO
        /// </summary>
        /// <returns>List<<THAM_SO>></returns>
        public List<THAM_SO> GetList()
        {
            return objTHAM_SODA.GetList();
        }

        /// <summary>
        /// Get DataSet of THAM_SO
        /// </summary>
        /// <returns>DataSet</returns>
        public DataSet GetDataSet()
        {
            return objTHAM_SODA.GetDataSet();
        }

        /// <summary>
        /// Get all of THAM_SO paged
        /// </summary>
        /// <param name="recperpage">recperpage</param>
        /// <param name="pageindex">pageindex</param>
        /// <returns>List<<THAM_SO>></returns>
        public List<THAM_SO> GetListPaged(int recperpage, int pageindex)
        {
            return objTHAM_SODA.GetListPaged(recperpage, pageindex);
        }

        /// <summary>
        /// Get DataSet of THAM_SO paged
        /// </summary>
        /// <param name="recperpage">recperpage</param>
        /// <param name="pageindex">pageindex</param>
        /// <returns>DataSet</returns>
        public DataSet GetDataSetPaged(int recperpage, int pageindex)
        {
            return objTHAM_SODA.GetDataSetPaged(recperpage, pageindex);
        }

        #endregion ***** Get Methods *****

        #region ***** Add Update Delete Methods *****

        /// <summary>
        /// Add a new THAM_SO within THAM_SO database table
        /// </summary>
        /// <param name="obj_tham_so">THAM_SO</param>
        /// <returns>key of table</returns>
        public long Add(THAM_SO obj_tham_so)
        {
            return objTHAM_SODA.Add(obj_tham_so);
        }

        /// <summary>
        /// updates the specified THAM_SO
        /// </summary>
        /// <param name="obj_tham_so">THAM_SO</param>
        /// <returns></returns>
        public void Update(THAM_SO obj_tham_so)
        {
            objTHAM_SODA.Update(obj_tham_so);
        }

        /// <summary>
        /// Delete the specified THAM_SO
        /// </summary>
        /// <param name="ma_tham_so">MA_THAM_SO</param>
        /// <returns></returns>
        public void Delete(Int64 ma_tham_so)
        {
            objTHAM_SODA.Delete(ma_tham_so);
        }

        #endregion ***** Add Update Delete Methods *****
    }
}